<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page session="true"%>
<jsp:directive.page import="DAO.TrainManageDAO" />
<jsp:directive.page import="entity.Train" />
<jsp:directive.page import="java.util.List" />
<%
	String action = request.getParameter("action");
	String id = request.getParameter("id");
	if (id == null || id == "") {
		out.println("没有选中删除的车次");
		return;
	}
	if ("del".equals(action)) {
		int isDelete = TrainManageDAO.delete(id);
		request.setAttribute("isDelete", isDelete);
	}
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<jsp:include page="./head/head.jsp"></jsp:include> 
<body>
	<div align="center">
		<div class="header">
		<jsp:include page="./head/header.jsp"></jsp:include>
		</div>

		<div class="content">
			<table border="0" width="1024" cellpadding="0" cellspacing="0">
				<tr>
					<td width="130" bgcolor="#dfeaf1" valign="top">
						<div class="nav">
							<jsp:include page="./navigation/navigation.jsp"></jsp:include>
						</div>
					</td>
					<td>
						<table width="100%" height="350" border="1" cellpadding="0"
							cellspacing="0" bgcolor="#dfeaf1">
							<tr>
								<TD align="center" valign="top"
									style="padding-left: 20px; padding-top: 10px;">
									<div align="left">
										当前位置: <a href="../index.jsp">首页</a> > 
										<a href="trainManage.jsp">车次信息管理</a> 
										> 删除车次
									</div> 
								<br />
								<br />
									<table border="2" bordercolor="#12A0F5" width="50%"
										height="80%">
										<tr align=center>
											<td>
												<H2 style="COLOR: #880000">删除成功</H2>
												<H4>
													管理员 xxx 成功删除该车次信息<br />系统将在 <input type="text"
														style='font-size: 18px; border: 0px; width: 20px;'
														readonly="true" value="5" id="time">秒后返回火车票系统管理员车次管理界面
												</H4>
											</td>
										</tr>
									</table> 
									<!-- 时间函数 --> 
									 <script language="javascript">
										var t = 5;
										var time = document
												.getElementById("time");
										function fun() {
											t--;
											time.value = t;
											if (t <= 0) {
												location.href = "trainManage.jsp";
											}
										}
										var inter = setInterval("fun()", 1000);
									</script>
								<br />
								<br />
								</TD>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td height="20"></td>
				</tr>
			</table>
		</div>

		<div class="footer">
			<!-- 底部版权所有界面 -->
			<jsp:include page="./footer/footer.jsp"/> 
		</div>
	</div>
</body>
</html>
